<!--
 * @Descripttion: 
 * @version: 
 * @Author: wtzhang
 * @Date: 2021-05-28 16:14:48
 * @LastEditors: wtzhang
 * @LastEditTime: 2021-06-02 14:44:34
-->
<!-- 公共部分引入·模板继承 -->
{{ extend './_layouts/home.html' }}

{{ block 'head'}}
<style>
  .home-article {
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
</style>
{{/block}}

{{block 'body'}}
<main class="container" style="padding: 57px 0;">
  <!-- <h3 class="sub-title">最新</h3> -->
  <div class="my-3 p-3 bg-body rounded shadow-sm">
    <h6 class="pb-2 mb-0">Recent updates</h6>
    {{ each topics}}
    <div class="d-flex text-muted pt-3">
      <img width="32" height="32" src="/public/img/avatar-default.png" alt="">
      <p class="pb-3 mb-0 small lh-sm pl10">
        <strong class="d-block text-gray-dark"><a href="/topics/show?id={{$value._id}}">@{{$value.title}}</a></strong>
        <span class="home-article">{{ $value.article }}</span>
      </p>
    </div>
    <p class="border-bottom">发表于：{{$value.created_time | getDate}} <span
        style="float: right;">author：{{$value.nickname}}</span></p>
    {{/each}}
    <small class="d-block text-end mt-3">
      <!-- <a href="#">All updates</a> -->
    </small>
  </div>
</main>
{{/block}}